package cn.cloud.butler.scheduled.repository;

import cn.cloud.butler.scheduled.domain.StateTimeSumEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.Date;

public interface StateTimeSumRepository extends JpaRepository<StateTimeSumEntity, Long> {

    @Query(value = "select * from StateTimeSum t where t.MacSN = ?1 and date(t.UploadTime) = ?2 and t.RunState= ?3 ", nativeQuery = true)
    StateTimeSumEntity findByMacSnAndUploadTime(String macSn, String preDate,String runState);
}
